﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class Controls_TecnoPezCalendar : System.Web.UI.UserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }

    public bool isValidDate()
    {
        DateTime validador;
        return DateTime.TryParse(TextBox2.Text, out validador);
       
    }

    public DateTime fecha
    {
        get
        {
            
                return Convert.ToDateTime(this.TextBox2.Text);
            
        }
        set
        {
            this.TextBox2.Text = value.ToShortDateString();
        }
    }

    public bool Enabled
    {
        get
        {
            return this.TextBox2.Enabled;
        }
        set
        {
            this.TextBox2.Enabled = value;
            this.btnCal.Enabled = value;
        }
    }
}
